<?php

class User_Controller_Browse_Ajax_Setting_Name extends Nuo_Controller_Resolver
{

	function doForm($request)
	{
		$user = Nuo::getUser();
		return  array('html' => Nuo::getView()->render('user/view/controller/browse/ajax/setting/name/form', array('user' => $user)));
	}

	function doCancel($request)
	{
		$user = Nuo::getUser();
		return  array('html' => Nuo::getView()->render('user/view/controller/browse/ajax/setting/name/cancel', array('user' => $user)));
	}

	function doSubmit($request)
	{
		$name = $_POST['full_name'];
		$user = Nuo::getUser();
		$user -> full_name = $name;
		$user -> save();
		return  array('html' => Nuo::getView()->render('user/view/controller/browse/ajax/setting/name/cancel', array('user' => $user)));
	}

}
